import React, { PureComponent }from 'react';
import { Redirect } from 'dva/router';
import styles from './index.less'

import Pc from './pc';
import Mobile from './mobile';

class Index extends PureComponent {
  render() {
    const { location } = this.props;
    if(location.pathname === '/') {
      return (
        <Redirect to='/holiday/apply'/>
      )
    }
    return(
      <div>
        <div className={styles.Pc}>
          <Pc location={this.props.location}/>
        </div>
        <div className={styles.Mobile}>
          <Mobile />
        </div>
      </div>
    );
  }
}

export default Index;
